@import '~styles/settings.scss';

.c-map-main {
  height: 100%;
  padding-top: 43px;

  .main-map-container {
    width: 100%;
    height: calc(100% - 50px);
    z-index: 1;
    position: relative;

    @media screen and (min-width: $screen-m) {
      width: calc(100% - 76px);
      height: 100%;
      margin-left: 76px;
    }

    .main-map {
      height: 100%;
    }

    .map-attributions {
      z-index: 5;

      @media screen and (min-width: $screen-m) {
        right: rem(255px);
        bottom: rem(15px);
        justify-content: flex-end;
        width: auto;
      }
    }

    .map-scale {
      @media screen and (min-width: $screen-m) {
        right: rem(255px);
        bottom: rem(50px);
        left: auto;
        top: auto;
      }
    }
  }

  .main-map-tooltip {
    height: 100%;
  }

  .main-map-controls {
    position: absolute;
    top: rem(15px);
    right: rem(15px);
    z-index: 5;
    display: flex;

    @media screen and (min-width: $screen-m) {
      bottom: rem(15px);
      top: auto;
      display: block;
    }
  }

  .data-analysis-menu {
    position: absolute;
    left: rem(91px);
    top: rem(60px);
    z-index: 6;

    &.embed {
      right: rem(15px);
      left: auto;
    }
  }

  &.embed {
    height: 100%;

    .main-map-container {
      width: 100%;

      @media screen and (min-width: $screen-m) {
        width: 100%;
        margin-left: 0;
      }
    }

    .map-attributions {
      right: rem(15px);
    }

    .data-analysis-menu {
      right: rem(15px);
      left: auto;
    }
  }
}
